public class Test4 {
    public static void main(String[] args) {
        String s1 = "helloworld";
        String s2 = "hello";
        String s3 = "world";
        String s4 = "hello" + "world";
        String s5 = s2 + s3;
        String s6 = new String("helloword");
        String s7 = "hello" + new String("world");
        System.out.println(s1 == s4);
        System.out.println(s1 == s5);
        System.out.println(s1 == s6);
        System.out.println(s1 == s7);
    }
}